package com.rk.order.controller.api;

import com.rk.common.result.Result;
import com.rk.hosp.vo.order.OrderCountQueryVo;
import com.rk.order.service.OrderInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :Rk.
 * @date : 2023/1/4
 */
@Api(tags = "统计管理接口")
@RestController
@RequestMapping("/admin/order")
public class StatisticsController {
    @Autowired
    private OrderInfoService orderInfoService;


    @ApiOperation(value = "获取订单统计数据")
    @GetMapping("/getCountMap")
    public Result getCountMap(@ApiParam(name = "orderCountQueryVo", value = "查询对象", required = false) OrderCountQueryVo orderCountQueryVo) {
        return Result.ok(orderInfoService.getCountMap(orderCountQueryVo));
    }

}
